package com.lewis.module.m2.api.bill.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lewis.common.core.annotation.Excel;
import com.lewis.common.core.entity.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * bill对象 bill
 *
 * @author lewis
 * @date 2021-11-02
 */
@Data
@Accessors(chain = true)
@TableName("bill")
public class Bill extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(exist = false)
    @ApiModelProperty(value = "qq账号")
    private String qq;

    @Excel(name = "用户id")
    private Long userId;

    @Excel(name = "描述")
    private String remark;

    @Excel(name = "账单类型 1：收入 0：支出（默认）")
    private Integer billType;

    @Excel(name = "账单金额")
    private Double money;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ctime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date utime;

    @Excel(name = "账单编码")
    private Integer billCodeId;
}